package com.tbsoft.ehr.model;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 加班信息对象
 * @author lizhenhua
 *
 */

@Entity
@Table(name="EHR_WORKOVERTIME")
public class WorkOvertime extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int id;	
	//年月
	private String yearMonth;
	//加班工时
	private BigDecimal hours;	
	//是否付费 是：Y，否：N
	private String pay;
	//备注/说明
	private String remark;
	//所在服务客户
	private ServiceCustomer serviceCustomer;
	//档案信息
	private StaffInfo staff;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name="YEARMONTH",nullable=false,length=10)
	public String getYearMonth() {
		return yearMonth;
	}
	public void setYearMonth(String yearMonth) {
		this.yearMonth = yearMonth;
	}
	@Column(name="OVER_HOURS",precision=6,scale=2,nullable=false)
	public BigDecimal getHours() {
		return hours;
	}
	public void setHours(BigDecimal hours) {
		this.hours = hours;
	}
	
	@Column(name="PAY",nullable=false,length=2)
	public String getPay() {
		return pay;
	}
	public void setPay(String pay) {
		this.pay = pay;
	}
	
	@Column(name="REMARK",length=250)
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@ManyToOne
	@JoinColumn(name="SC_ID")
	public ServiceCustomer getServiceCustomer() {
		return serviceCustomer;
	}
	public void setServiceCustomer(ServiceCustomer serviceCustomer) {
		this.serviceCustomer = serviceCustomer;
	}
	
	@ManyToOne
	@JoinColumn(name="STAFF_ID")
	public StaffInfo getStaff() {
		return staff;
	}
	public void setStaff(StaffInfo staff) {
		this.staff = staff;
	}
		
}
